export interface IGetCategoryList {
    id: string
    shopId: string
    createTime: string
    categoryId: string
    distributionMode: string[]
    freightTemplateId: string
    attributeId: string
    name: string
    pic: string
    albumPics: string
    videoUrl: string
    status: string
    sort: number
    serviceIds: string[]
    detail: string
    score: number
    storageSkus: IStorageSkus[]
    productAttributes: IProductAttributes[]
    productCategory: IProductCategory
}
interface IStorageSkus {
    id: string
    stockType: string
    stock: string
    salePrice: string
}
interface IProductCategory {
    id: string
    categoryImg: string
    createTime: string
    deleted: boolean
    name: string
    parentId: string
    sort: number
    updateTime: string
    version: number
    level: string
}
interface IProductAttributes {
    id: string
    productId: string
    name: string
    content: string
}
enum DISTRIBUTION {
    MERCHANT = '',
    EXPRESS = '快递配送', //快递配送
    INTRA_CITY_DISTRIBUTION = '同城配送', //同城配送
    SHOP_STORE = '店铺门店', //店铺门店
}

interface DistributionModeListTypes {
    label: string
    value: string
    checked: boolean
}
// 产品类型枚举
enum ProductType {
    REAL_PRODUCT, // 真实商品
    VIRTUAL_PRODUCT, // 虚拟商品
}

export interface FormDataTypes {
    productType: keyof typeof ProductType
    shopId?: string
    id?: string
    distributionModeList: DistributionModeListTypes[]
    imglist: string[]
    name: string
    saleDescribe: string
    distributionMode: string[]
    albumPics: string[] | string
    platformCategory: {
        one: string | null
        two: string | null
        three: string | null
    }
    platformCategoryId: string
    shopCategory: {
        one: string
        two: string
        three: string
    }
    skus: {
        initSalesVolume: number
        limitType: string
        limitNum: number
        image: string
        price: number
        salePrice: number
        specs: string[]
        id: string
        stockType: string
        initStock: number
        weight: number
    }[]
    specGroups: SpecGroupsTypes[] | []
    freightTemplateId: string
    detail: string
    attributeId: string
    status: string
    videoUrl: string
    categoryId: string
    serviceIds: string[]
    price: number
    salePrice: number
    initSalesVolume: number
    weight: number
    stockType: string
    initStock: number
    limitType: string
    limitNum: number
    openSpecs: boolean
    shopText: string
    platformText: string
    freightText: string
    productParameters: []
    productAttributes: []
}
//规格组数据格式
interface SpecGroupsTypes {
    name: string
    order: number
    children: {
        name: string
        order: number
    }[]
}

export interface SkusListState {
    // "id": "1642089532610244608",
    // "createTime": "2023-04-01 17:00:28",
    // "updateTime": "2023-04-01 17:00:28",
    // "version": 0,
    // "deleted": false,
    // "activityType": "COMMON",
    // "activityId": "0",
    // "shopId": "1613792222109024256",
    // "productId": "1642089532273618944",
    // "stockType": "LIMITED",
    // "stock": "0",
    // "salesVolume": "0",
    // "initSalesVolume": "0",
    // "limitType": "UNLIMITED",
    // "limitNum": 0,
    // "specsIds": [
    //     "1642089532517699584"
    // ],
    // "specs": [
    //     "红色"
    // ],
    // "image": "https://medusa-small-file-1253272780.cos.ap-shanghai.myqcloud.com/gruul/20230401/ebaa235202f74259badec31f0961ed82.jpg",
    // "price": "10000",
    // "salePrice": "10000",
    // "weight": 1
    id: string
    createTime: string
    updateTime: string
    version: number
    deleted: boolean
    activityType: string
    activityId: string
    shopId: string
    productId: string
    stockType: string
    stock: string
    salesVolume: string
    initSalesVolume: string
    limitType: string
    limitNum: number
    specsIds: string[]
    specs: string[]
    image: string
    price: string
    salePrice: string
    weight: number
    [propsName: string]: any
}
